<template>
	<div class="swiper-container swiper3" style="text-align: center;">
		<div class="slider swiper-wrapper">
			<div class="item swiper-slide" v-for="(item, index) in companyVoteList">
				<ul>
					<li v-for="(obj, index) in item">
						<router-link :to="{ name: 'CompanyVote'}">
							<img v-bind:src="obj.img" alt="" />
							<p>{{obj.title }}</p>
						</router-link>
					</li>
					
				</ul>
			</div>
		</div>
		<div class="swiper-pagination pageStyle pagination3"></div>
	</div>
</template>

<script>
	import axios from 'axios'
	var companyVoteList = [
		[
			{
				img:require("../assets/img/o@2x.png"),
				title:"外汇经纪"
			},{
				img:require("../assets/img/t@2x.png"),
				title:"资产管理"
			},{
				img:require("../assets/img/s@2x.png"),
				title:"培训机构"
			},{
				img:require("../assets/img/f@2x.png"),
				title:"代理商"
			},{
				img:require("../assets/img/g@2x.png"),
				title:"软件提供"
			},{
				img:require("../assets/img/h@2x.png"),
				title:"支付平台"
			},{
				img:require("../assets/img/j@2x.png"),
				title:"区块链"
			},{
				img:require("../assets/img/k@2x.png"),
				title:"解决方案"
			},{
				img:require("../assets/img/l@2x.png"),
				title:"贵金属"
			},{
				img:require("../assets/img/p@2x.png"),
				title:"金融媒体"
			}
		],
		[
			{
				img:require("../assets/img/o@2x.png"),
				title:"2外汇经"
			},{
				img:require("../assets/img/t@2x.png"),
				title:"2资产管"
			},{
				img:require("../assets/img/s@2x.png"),
				title:"2培训机"
			},{
				img:require("../assets/img/f@2x.png"),
				title:"代理商"
			},{
				img:require("../assets/img/g@2x.png"),
				title:"软件提供"
			},{
				img:require("../assets/img/h@2x.png"),
				title:"支付平台"
			},{
				img:require("../assets/img/j@2x.png"),
				title:"区块链"
			},{
				img:require("../assets/img/k@2x.png"),
				title:"解决方案"
			},{
				img:require("../assets/img/l@2x.png"),
				title:"贵金属"
			},{
				img:require("../assets/img/p@2x.png"),
				title:"金融媒体"
			}
		],
	];
	
	export default {
  		name: 'companyVoteType',
		data() {
	      return {
	        companyVoteList:companyVoteList
	      }
	   },
	   mounted(){
  			var _this = this;
			_this.init();
		},
		methods: {
			init(){
				var _this = this;
				console.log(_this.$store.state.domain);
				axios.get('/test/mockData', {
				  params: {ID: "indexSection"}
				}).then(function(res) {
					_this.$nextTick(()=>{ 
						var swiper = new Swiper('.swiper3', {
							loop: true,
						   	autoplay: {
					        delay: 3500
					      },
					      pagination: {
					        el: '.pagination3',
					        clickable: true,
					        renderBullet: function (index, className) {
					          return '<span class="' + className + '"></span>';
					        },
					      },
					  });
				   });
				}).catch(function(error) {
					console.log(error);
				});
				
			}
		}
	}
</script>
